package com.example.gongj;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;

/**
 * 字符缓存输入流
 */
public class BufferedReaderDemo {
    public static void main(String[] args) throws Exception {
        FileReader fr = new FileReader("IO流\\f.txt");
        BufferedReader br = new BufferedReader(fr);
        String line = null;
        while ((line = br.readLine()) != null){
            System.out.println(line);
        }
        // 释放资源
        br.close();
    }
}
